export default {
  route: '/project/template/tabs/1',
  title: '标签页模版',
  local: {},
  remote: {},
  elementConfig: {
    type: 'HtGuiContainer',
    props: {},
    children: [
      {
        type: 'HtTabs',
        props: {
          tabsType: 'line',
          tabsPosition: 'top',
          tabs: [
            {
              title: '标签一',
              value: 'tab1',
              disabled: false,
              showIndexs: [0],
            },
            {
              title: '标签二',
              value: 'tab2',
              disabled: false,
              showIndexs: [1],
            },
          ],
          defaultActiveKey: 'tab1',
          content: [
            {
              type: 'HtList',
              props: {
                url: '/mock/api/demo/list',
                pageSize: 10,
                columns: [
                  {
                    title: 'id',
                    dataIndex: 'id',
                    width: 60,
                  },
                  {
                    title: '姓名',
                    dataIndex: 'name',
                    width: 100,
                    type: 'HtList.column',
                    tooltip: '',
                    renderType: 'default',
                    showOverflowTooltip: false,
                    sort: false,
                    filterColumns: false,
                    'v-if': '<%:= row => true %>',
                  },
                  {
                    title: '头像',
                    dataIndex: 'avatar',
                    renderType: 'img',
                    width: 100,
                  },
                  {
                    title: '人物介绍',
                    dataIndex: 'remark',
                    type: 'HtList.column',
                    tooltip: '',
                    renderType: 'default',
                    sort: false,
                    filterColumns: false,
                    'v-if': '<%:= row => true %>',
                  },
                  {
                    title: '操作',
                    width: 160,
                    renderType: 'operations_new',
                    fixed: true,
                    operations: [
                      {
                        text: '跳转',
                        actionType: 'jump',
                        url: '/xxx/edit',
                        transform: '<%:= (row) => ({ ...row }) %>',
                      },
                      {
                        text: '删除',
                        actionType: 'xhr',
                        url: '/xxx/delete',
                      },
                    ],
                    operations3: [
                      {
                        type: 'HtModalForm',
                        __noRender: true,
                        props: {
                          triggerButtonText: '弹框',
                          title: '编辑',
                          width: 516,
                          top: 100,
                          url: '/mock/api/update',
                          method: 'post',
                          fields: [
                            {
                              'v-if': '<%:= true %>',
                              field: 'name',
                              title: '姓名',
                              disabled: false,
                              extra: '',
                              required: false,
                              placeholder: '',
                              type: 'Input',
                              defaultValue: '',
                            },
                          ],
                          buttons: ['cancel', 'submit'],
                          transform:
                            '<%:= (row, data) => ({  ...row, ...data }) %>',
                          'v-if': '<%:= row => true %>',
                          buttonType: 'primary',
                          cols: 1,
                          alias: '$$HtListModalForm',
                          type: 'HtModalForm',
                        },
                        children: [],
                      },
                    ],
                  },
                ],
                alias: '$$HtList1',
                type: 'HtList',
                uniqueKey: 'id',
                cols: 3,
                isAutoSubmit: true,
                columnsSetting: false,
                isPagination: true,
                pageSizeOptions: ['10', '20', '50', '100', '500', '1000'],
                method: 'get',
                buttons: ['submit', 'reset'],
                cardType: 'plain',
                transform: '<%:= data => ({ ...data }) %>',
                fieldMap: {
                  pageNumKey: 'pageNum',
                  pageSizeKey: 'pageSize',
                  listKey: 'list',
                  totalKey: 'total',
                },
                extra: [],
                fields: [
                  {
                    'v-if': '<%:= true %>',
                    field: 'name',
                    title: '单行文本',
                    disabled: false,
                    tooltip: '',
                    required: false,
                    placeholder: '',
                    type: 'Input',
                    defaultValue: '',
                  },
                ],
              },
              children: [],
            },
            {
              type: 'HtForm',
              props: {
                title: '表单',
                isCard: false,
                url: '/mock/api/update',
                fields: [
                  {
                    field: 'name',
                    title: '姓名',
                    disabled: false,
                    tooltip: '',
                    required: false,
                    placeholder: '',
                    type: 'Input',
                    defaultValue: '',
                  },
                  {
                    field: 'sex',
                    title: '性别',
                    disabled: false,
                    tooltip: '',
                    required: false,
                    placeholder: '',
                    options: [
                      {
                        label: '男',
                        value: '1',
                      },
                      {
                        label: '女',
                        value: '0',
                      },
                    ],
                    defaultValue: '1',
                    type: 'Radio',
                  },
                  {
                    field: 'season',
                    title: '登场季数',
                    disabled: false,
                    tooltip: '',
                    required: false,
                    placeholder: '',
                    defaultValue: 1,
                    type: 'InputNumber',
                  },
                  {
                    field: 'remark',
                    title: '人物介绍',
                    disabled: false,
                    tooltip: '',
                    required: false,
                    placeholder: '',
                    type: 'Input.TextArea',
                    rows: 4,
                    defaultValue: '',
                  },
                ],
                alias: '$$HtForm',
                labelCol: {
                  span: 6,
                  offset: 0,
                },
                wrapperCol: {
                  span: 16,
                  offset: 0,
                },
                type: 'HtForm',
                method: 'post',
                cols: 1,
                responseAlias: '$$HtFormResponse',
                buttons: ['back', 'submit'],
                transform: '<%:= data => ({ ...data }) %>',
              },
            },
          ],
          type: 'HtTabs',
          extra: [
            {
              type: 'HtButton',
              props: {
                href: '/',
                text: '跳转页面',
                useH5Href: false,
                type: 'link',
              },
            },
            {
              type: 'HtModalForm',
              props: {
                url: '/mock/api/update',
                fields: [
                  {
                    field: 'name',
                    title: '姓名',
                  },
                  {
                    field: 'age',
                    title: '年龄',
                    type: 'InputNumber',
                  },
                ],
                title: '弹框表单',
                triggerButtonText: '点我',
                buttonType: 'primary',
              },
            },
          ],
        },
        children: [],
      },
    ],
  },
}
